// dllmain.cpp : Defines the entry point for the DLL application.
#include "stdafx.h"

#include "hwinthread.h"

BOOL APIENTRY DllMain( HMODULE hModule,
                       DWORD  ul_reason_for_call,
                       LPVOID lpReserved
					 )
{
	switch (ul_reason_for_call)
	{
	case DLL_PROCESS_ATTACH:
        harlinn::windows::threading::CurrentThreadHandle::InitializeThreadData();
	case DLL_THREAD_ATTACH:
        harlinn::windows::threading::CurrentThreadHandle::InitializeThreadData();
	case DLL_THREAD_DETACH:
        harlinn::windows::threading::CurrentThreadHandle::FinalizeThreadData();
	case DLL_PROCESS_DETACH:
        harlinn::windows::threading::CurrentThreadHandle::FinalizeThreadData();
		break;
	}
	return TRUE;
}

